package com.king.service.impl;

import com.king.dao.AccountDao;
import com.king.domain.Account;
import com.king.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ProjectName: ssm
 * @Package: com.king.service.impl
 * @ClassName: AccountServiceImpl
 * @Author: 王团结
 * @Description:
 * @Date: 2019/8/30 12:05
 * @Version: 1.0
 */
@Service("accountService")
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountDao accountDao;
    @Override
    public List<Account> findAll() {
        System.out.println("业务层，查询所有账户。。");
        return accountDao.findAll();
    }

    @Override
    public void saveAccount(Account account) {
        System.out.println("业务层，保存账户");
        accountDao.saveAccount(account);
    }
}
